/*  ----------------------------------------------------------------------------
*	This file is part of the AS3This ActionScript 3 library.
*	Author: Steve Jones for G-RAFF <http://www.g-raff.com/>
*	Copyright (c) 2009 raffWorks Ltd.
*	----------------------------------------------------------------------------
*	Please see the notice at the bottom of the code before using or modifying this class.
*/
package com.as3this.core
{
	import flash.geom.Rectangle;
	
	public class Destination
	{
		public static const BASE_ENDPOINT	:String = "http://api.addthis.com/oexchange/0.8/forward";
		
		/**
		 * <p>Returns the URL that corresponds to a requested sharing destination</p>
		 * @param destination	The sharing destination eg. "twitter" or "facebook". 
		 * <p>A full list is supplied as constants in the <code>Destination</code> class</p>
		 * 
		 * @see com.as3this.Destination
		 */
		 
		public static function getEndpoint(destination:String = null) : String
		{
			return BASE_ENDPOINT + (destination?"/" + destination:MENU)  + "/offer"
		}
		
		/**
		 * <p>Returns the title of a service in "camel case".</p>
		 * @param destination	The sharing destination eg. "twitter" or "facebook". 
		 * <p>Requesting <code>Destination.TWITTER</code> would return "Twitter"</p>
		 * 
		 * @see com.as3this.Destination
		 */
		 
		public static function getTitle(destination:String = null) : String
		{
			// a fix as you can't have a property name starting with a number
			var dest:String = (destination == "100zakladok")?"zakladok":destination;
			
			return SERVICES[dest].title;
		}
		
		public static const A1WEBMARKS			:String = "a1webmarks";
		public static const AIM					:String = "aim";
		public static const AMAZONWISHLIST		:String = "amazonwishlist";
		public static const AMENME				:String = "amenme";
		public static const AOLMAIL				:String = "aolmail";
		public static const ARTO				:String = "arto";
		public static const ASK					:String = "ask";
		public static const AVIARY				:String = "aviary";
		public static const BACKFLIP			:String = "backflip";
		public static const BAIDU				:String = "baidu";
		public static const BALLHYPE			:String = "ballhype";
		public static const BEBO				:String = "bebo";
		public static const BITLY				:String = "bitly";
		public static const BIZSUGAR			:String = "bizsugar";
		public static const BLEETBOX			:String = "bleetbox";
		public static const BLINKLIST			:String = "blinklist";
		public static const BLIP				:String = "blip";
		public static const BLOGGER				:String = "blogger";
		public static const BLOGGY				:String = "bloggy";
		public static const BLOGMARKS			:String = "blogmarks";
		public static const BOBRDOBR			:String = "bobrdobr";
		public static const BONZOBOX			:String = "bonzobox";
		public static const BORDOM				:String = "bordom";
		public static const BRAINIFY			:String = "brainify";
		public static const BRYDERI				:String = "bryderi";
		public static const BUDDYMARKS			:String = "buddymarks";
		public static const BUZZ				:String = "buzz";
		public static const CARE2				:String = "care2";
		public static const CITEULIKE			:String = "citeulike";
		public static const COLIVIA				:String = "colivia";
		public static const CONNOTEA			:String = "connotea";
		public static const DELICIOUS			:String = "delicious";
		public static const DESIGNBUMP			:String = "designbump";
		public static const DESIGNMOO			:String = "designmoo";
		public static const DESKTOPEMAIL		:String = "desktopemail";
		public static const DIGG				:String = "digg";
		public static const DIGGITA				:String = "diggita";
		public static const DIGLOG				:String = "diglog";
		public static const DIIGO				:String = "diigo";
		public static const DOMAINTOOLSWHOIS	:String = "domaintoolswhois";
		public static const DOMELHOR			:String = "domelhor";
		public static const DOOWER				:String = "doower";
		public static const DOSTI				:String = "dosti";
		public static const DOTNETKICKS			:String = "dotnetkicks";
		public static const DOTNETSHOUTOut		:String = "dotnetshoutout";
		public static const DROPJACK			:String = "dropjack";
		public static const DZONE				:String = "dzone";
		public static const EDELIGHT			:String = "edelight";
		public static const EKUDOS				:String = "ekudos";
		public static const EMAIL				:String = "email";
		public static const EMBARKONS			:String = "embarkons";
		public static const EUCLIQUEI			:String = "eucliquei";
		public static const EVERNOTE			:String = "evernote";
		public static const FABULOUSLY40		:String = "fabulously40";
		public static const FACEBOOK			:String = "facebook";
		public static const FARK				:String = "fark";
		public static const FAVES				:String = "faves";
		public static const FAVICON				:String = "favicon";
		public static const FAVORITES			:String = "favorites";
		public static const FAVORITUS			:String = "favoritus";
		public static const FLOSSPRO			:String = "flosspro";
		public static const FNEWS				:String = "fnews";
		public static const FOLKD				:String = "folkd";
		public static const FORGETFOO			:String = "forgetfoo";
		public static const FRESQUI				:String = "fresqui";
		public static const FRIENDFEED			:String = "friendfeed";
		public static const FRIENDSTER			:String = "friendster";
		public static const FUNP				:String = "funp";
		public static const FWISP				:String = "fwisp";
		public static const GABBR				:String = "gabbr";
		public static const GACETILLA			:String = "gacetilla";
		public static const GAMESNETWORKs		:String = "gamesnetworks";
		public static const GLOBALGRIND			:String = "globalgrind";
		public static const GLUVSNAP			:String = "gluvsnap";
		public static const GMAIL				:String = "gmail";
		public static const GOOGLE				:String = "google";
		public static const GOOGLEREADER		:String = "googlereader";
		public static const GOOGLETRANSLate		:String = "googletranslate";
		public static const GRAVEE				:String = "gravee";
		public static const GRUMPER				:String = "grumper";
		public static const HABERGENTR			:String = "habergentr";
		public static const HACKERNEWS			:String = "hackernews";
		public static const HADASHHOT			:String = "hadashhot";
		public static const HATENA				:String = "hatena";
		public static const HAZARKOR			:String = "hazarkor";
		public static const HELLOTXT			:String = "hellotxt";
		public static const HEMIDEMI			:String = "hemidemi";
		public static const HI5					:String = "hi5";
		public static const HIPSTR				:String = "hipstr";
		public static const HITMARKS			:String = "hitmarks";
		public static const HOTKLIX				:String = "hotklix";
		public static const HOTMAIL				:String = "hotmail";
		public static const HYVES				:String = "hyves";
		public static const IDENTICA			:String = "identica";
		public static const IGOOGLE				:String = "igoogle";
		public static const INVESTORLINKs		:String = "investorlinks";
		public static const JAMESPOT			:String = "jamespot";
		public static const JUMPTAGS			:String = "jumptags";
		public static const KABOODLE			:String = "kaboodle";
		public static const KAEVUR				:String = "kaevur";
		public static const KIRTSY				:String = "kirtsy";
		public static const KLEDY				:String = "kledy";
		public static const KOORNK				:String = "koornk";
		public static const KUDOS				:String = "kudos";
		public static const LAAIKIT				:String = "laaikit";
		public static const LIBRERIO			:String = "librerio";
		public static const LINKAGOGO			:String = "linkagogo";
		public static const LINKEDIN			:String = "linkedin";
		public static const LINKNINJA			:String = "linkninja";
		public static const LINKSTORE			:String = "linkstore";
		public static const LINKUJ				:String = "linkuj";
		public static const LIVE				:String = "live";
		public static const LIVEJOURNAL			:String = "livejournal";
		public static const LUNCH				:String = "lunch";
		public static const LYNKI				:String = "lynki";
		public static const MECCHO				:String = "meccho";
		public static const MEINVZ				:String = "meinvz";
		public static const MEMORI				:String = "memori";
		public static const MENEAME				:String = "meneame";
		public static const MENU				:String = "menu";
		public static const MINDBODYGREEN		:String = "mindbodygreen";
		public static const MISTERWONG			:String = "misterwong";
		public static const MISTERWONG_DE		:String = "misterwong_de";
		public static const MISTERWONG_RU		:String = "misterwong_ru";
		public static const MIXX				:String = "mixx";
		public static const MOB					:String = "mob";
		public static const MORE				:String = "more";
		public static const MSSOCIALBOOKMARKS	:String = "mssocialbookmarks";
		public static const MULTIPLY			:String = "multiply";
		public static const MYAOL				:String = "myaol";
		public static const MYLINKVAULT			:String = "mylinkvault";
		public static const MYNASA				:String = "mynasa";
		public static const MYSPACE				:String = "myspace";
		public static const MYYEARBOOK			:String = "myyearbook";
		public static const N4G					:String = "n4g";
		public static const NETLOG				:String = "netlog";
		public static const NETSCAPE			:String = "netscape";
		public static const NETVIBES			:String = "netvibes";
		public static const NETVOUZ				:String = "netvouz";
		public static const NEWSTRUST			:String = "newstrust";
		public static const NEWSVINE			:String = "newsvine";
		public static const NUJIJ				:String = "nujij";
		public static const OKNOTIZIE			:String = "oknotizie";
		public static const ONEVIEW				:String = "oneview";
		public static const ORKUT				:String = "orkut";
		public static const OSMOSUS				:String = "osmosus";
		public static const OYYLA				:String = "oyyla";
		public static const PDFONLINE			:String = "pdfonline";
		public static const PHONEFAVS			:String = "phonefavs";
		public static const PIMPTHISBLOG		:String = "pimpthisblog";
		public static const PINGFM				:String = "pingfm";
		public static const PLANYPUS			:String = "planypus";
		public static const PLAXO				:String = "plaxo";
		public static const PLURK				:String = "plurk";
		public static const POLLADIUM			:String = "polladium";
		public static const POSTEROUS			:String = "posterous";
		public static const PRINT				:String = "print";
		public static const PRINTFRIENDLy		:String = "printfriendly";
		public static const PROPELLER			:String = "propeller";
		public static const PUSHA				:String = "pusha";
		public static const QUANTCAST			:String = "quantcast";
		public static const READITLATER			:String = "readitlater";
		public static const REDDIT				:String = "reddit";
		public static const SCOOPAT				:String = "scoopat";
		public static const SEGNALO				:String = "segnalo";
		public static const SHAVEH				:String = "shaveh";
		public static const SHETOLDME			:String = "shetoldme";
		public static const SIMPY				:String = "simpy";
		public static const SLASHDOT			:String = "slashdot";
		public static const SMAKNEWS			:String = "smaknews";
		public static const SODAHEAD			:String = "sodahead";
		public static const SONICO				:String = "sonico";
		public static const SPEEDTILE			:String = "speedtile";
		public static const SPHINN				:String = "sphinn";
		public static const SPRINGPAD			:String = "springpad";
		public static const SQUIDOO				:String = "squidoo";
		public static const STARTAID			:String = "startaid";
		public static const STARTLAP			:String = "startlap";
		public static const STRANDS				:String = "strands";
		public static const STUDIVZ				:String = "studivz";
		public static const STUFFPIT			:String = "stuffpit";
		public static const STUMBLEUPON			:String = "stumbleupon";
		public static const STUMPEDIA			:String = "stumpedia";
		public static const STYLEHIVE			:String = "stylehive";
		public static const SVEJO				:String = "svejo";
		public static const SYMBALOO			:String = "symbaloo";
		public static const TAGZA				:String = "tagza";
		public static const TAILRANK			:String = "tailrank";
		public static const TECHNORATI			:String = "technorati";
		public static const TELLMYPOLITICIAN	:String = "tellmypolitician";
		public static const THISNEXT			:String = "thisnext";
		public static const TIPD				:String = "tipd";
		public static const TRANSFERR			:String = "transferr";
		public static const TULINQ				:String = "tulinq";
		public static const TUMBLR				:String = "tumblr";
		public static const TUSUL				:String = "tusul";
		public static const TWEETMEME			:String = "tweetmeme";
		public static const TWITTER				:String = "twitter";
		public static const TYPEPAD				:String = "typepad";                    
		public static const VIADEO				:String = "viadeo";                     
		public static const VIRB				:String = "virb";                       
		public static const VYOOM				:String = "vyoom";                      
		public static const W3VALIDATOR			:String = "w3validator";
		public static const WEBNEWS				:String = "webnews";
		public static const WEBS				:String = "webs";
		public static const WINDYCITIZEN		:String = "windycitizen";
		public static const WORDPRESS			:String = "wordpress";
		public static const WORIO				:String = "worio";
		public static const WOVRE				:String = "wovre";
		public static const WYKOP				:String = "wykop";
		public static const XANGA				:String = "xanga";
		public static const YAHOOBKM			:String = "yahoobkm";
		public static const YAHOOMAIL			:String = "yahoomail";
		public static const YAMMER				:String = "yammer";
		public static const YARDBARKER			:String = "yardbarker";
		public static const YIGG				:String = "yigg";
		public static const YOOLINK				:String = "yoolink";
		public static const YORUMCUYUM			:String = "yorumcuyum";
		public static const YOUMOB				:String = "youmob";
		public static const ZAKLADOK			:String = "zakladok";
		
		public static const SERVICES:Object = 
		{
			a1webmarks		:{title:"A1-Webmarks"},
			aim				:{title:"AIM"},
			amazonwishlist	:{title:"Amazon Wishlist"},
			amenme			:{title:"Amen Me!"},
			aolmail			:{title:"AOL Mail"},
			arto			:{title:"Arto"},
			ask				:{title:"Ask"},
			aviary			:{title:"Aviary Capture"},
			backflip		:{title:"Backflip"},
			baidu			:{title:"Baidu"},
			ballhype		:{title:"BallHype"},
			bebo			:{title:"Bebo"},
			bitly			:{title:"Bit.ly"},
			bizsugar		:{title:"bizSugar"},
			bleetbox		:{title:"Bleetbox"},
			blinklist		:{title:"Blinklist"},
			blip			:{title:"Blip"},
			blogger			:{title:"Blogger"},
			bloggy			:{title:"Bloggy"},
			blogmarks		:{title:"Blogmarks"},
			bobrdobr		:{title:"Bobrdobr"},
			bonzobox		:{title:"BonzoBox"},
			bordom			:{title:"Bordom"},
			brainify		:{title:"Brainify"},
			bryderi			:{title:"Bryderi"},
			buddymarks		:{title:"BuddyMarks"},
			buzz			:{title:"Buzz"},
			care2			:{title:"Care2"},
			citeulike		:{title:"CiteULike"},
			colivia			:{title:"Colivia"},
			connotea		:{title:"Connotea"},
			delicious		:{title:"Delicious"},
			designbump		:{title:"DesignBump"},
			designmoo		:{title:"Designmoo"},
			desktopemail	:{title:"Desktop Email"},
			digg			:{title:"Digg"},
			diggita			:{title:"Diggita"},
			diglog			:{title:"diglog"},
			diigo			:{title:"Diigo"},
			domaintoolswhois:{title:"WHOIS"},
			domelhor		:{title:"doMelhor"},
			doower			:{title:"Doower"},
			dosti			:{title:"Dosti"},
			dotnetkicks		:{title:"DotNetKicks"},
			dotnetshoutout	:{title:"DotNetShoutout"},
			dropjack		:{title:"Dropjack"},
			dzone			:{title:"dzone"},
			edelight		:{title:"edelight"},
			ekudos			:{title:"eKudos"},
			email			:{title:"Email"},
			embarkons		:{title:"Embarkons"},
			eucliquei		:{title:"euCliquei"},
			evernote		:{title:"Evernote"},
			fabulously40	:{title:"Fabulously40"},
			facebook		:{title:"Facebook"},
			fark			:{title:"Fark"},
			faves			:{title:"Faves"},
			favicon			:{title:"Favicon"},
			favorites		:{title:"Favorites"},
			favoritus		:{title:"Favoritus"},
			flosspro		:{title:"Floss.pro"},
			fnews			:{title:"Fnews"},
			folkd			:{title:"Folkd"},
			forgetfoo		:{title:"forgetfoo"},
			fresqui			:{title:"Fresqui"},
			friendfeed		:{title:"FriendFeed"},
			friendster		:{title:"Friendster"},
			funp			:{title:"funP"},
			fwisp			:{title:"fwisp"},
			gabbr			:{title:"Gabbr"},
			gacetilla		:{title:"Gacetilla"},
			gamesnetworks	:{title:"Gamesnetworks"},
			globalgrind		:{title:"GlobalGrind"},
			gluvsnap		:{title:"GluvSnap"},
			gmail			:{title:"Gmail"},
			google			:{title:"Google"},
			googlereader	:{title:"Google Reader"},
			googletranslate	:{title:"Translate"},
			gravee			:{title:"Gravee"},
			grumper			:{title:"Grumper"},
			habergentr		:{title:"Haber.gen.tr"},
			hackernews		:{title:"Hacker News"},
			hadashhot		:{title:"Hadash Hot"},
			hatena			:{title:"Hatena"},
			hazarkor		:{title:"Hazarkor"},
			hellotxt		:{title:"HelloTxt"},
			hemidemi		:{title:"HEMIDEMI"},
			hi5				:{title:"Hi5"},
			hipstr			:{title:"hipstr"},
			hitmarks		:{title:"Hitmarks"},
			hotklix			:{title:"Hotklix"},
			hotmail			:{title:"Hotmail"},
			hyves			:{title:"Hyves"},
			identica		:{title:"Identica"},
			igoogle			:{title:"iGoogle"},
			investorlinks	:{title:"InvestorLinks"},
			jamespot		:{title:"Jamespot"},
			jumptags		:{title:"Jumptags"},
			kaboodle		:{title:"Kaboodle"},
			kaevur			:{title:"Kaevur"},
			kirtsy			:{title:"KIRTSY"},
			kledy			:{title:"Kledy"},
			koornk			:{title:"koornk"},
			kudos			:{title:"Kudos"},
			laaikit			:{title:"Laaikit"},
			librerio		:{title:"Librerio"},
			linkagogo		:{title:"Link-a-Gogo"},
			linkedin		:{title:"LinkedIn"},
			linkninja		:{title:"LinkNinja"},
			linkstore		:{title:"LinkStore"},
			linkuj			:{title:"Linkuj.cz"},
			live			:{title:"Live"},
			livejournal		:{title:"LiveJournal"},
			lunch			:{title:"Lunch"},
			lynki			:{title:"Lynki"},
			meccho			:{title:"Meccho"},
			meinvz			:{title:"meinVZ"},
			memori			:{title:"Memori.ru"},
			meneame			:{title:"Menéame"},
			menu			:{title:"All"},
			mindbodygreen	:{title:"Mindbodygreen"},
			misterwong		:{title:"Mister Wong"},
			misterwong_de	:{title:"Mister Wong DE"},
			misterwong_ru	:{title:"Mister Wong RU"},
			mixx			:{title:"Mixx"},
			mob				:{title:"Mob"},
			more			:{title:"More"},
			mssocialbookmarks:{title:"MS Social Bookmarks"},
			multiply		:{title:"Multiply"},
			myaol			:{title:"My AOL"},
			mylinkvault		:{title:"mylinkvault"},
			mynasa			:{title:"MyNASA"},
			myspace			:{title:"MySpace"},
			myyearbook		:{title:"MyYearbook"},
			n4g				:{title:"N4G"},
			netlog			:{title:"NetLog"},
			netscape		:{title:"Netscape"},
			netvibes		:{title:"Netvibes"},
			netvouz			:{title:"Netvouz"},
			newstrust		:{title:"NewsTrust"},
			newsvine		:{title:"Newsvine"},
			nujij			:{title:"Nujij"},
			oknotizie		:{title:"OKNOtizie"},
			oneview			:{title:"oneview"},
			orkut			:{title:"orkut"},
			osmosus			:{title:"Osmosus"},
			oyyla			:{title:"Oyyla"},
			pdfonline		:{title:"PDF Online"},
			phonefavs		:{title:"PhoneFavs"},
			pimpthisblog	:{title:"PimpThisBlog"},
			pingfm			:{title:"Ping.fm"},
			planypus		:{title:"Planypus"},
			plaxo			:{title:"Plaxo"},
			plurk			:{title:"Plurk"},
			polladium		:{title:"Polladium"},
			posterous		:{title:"Posterous"},
			print			:{title:"Print"},
			printfriendly	:{title:"PrintFriendly"},
			propeller		:{title:"Propeller"},
			pusha			:{title:"Pusha"},
			quantcast		:{title:"Quantcast"},
			readitlater		:{title:"Read It Later"},
			reddit			:{title:"Reddit"},
			scoopat			:{title:"Scoop.at"},
			segnalo			:{title:"Segnalo"},
			shaveh			:{title:"Shaveh"},
			shetoldme		:{title:"She ToldMe"},
			simpy			:{title:"Simpy"},
			slashdot		:{title:"Slashdot"},
			smaknews		:{title:"SmakNews"},
			sodahead		:{title:"SodaHead"},
			sonico			:{title:"Sonico"},
			speedtile		:{title:"Speedtile"},
			sphinn			:{title:"Sphinn"},
			springpad		:{title:"springpad"},
			squidoo			:{title:"Squidoo"},
			startaid		:{title:"Startaid"},
			startlap		:{title:"Startlap"},
			strands			:{title:"Strands"},
			studivz			:{title:"studiVZ"},
			stuffpit		:{title:"Stuffpit"},
			stumbleupon		:{title:"StumbleUpon"},
			stumpedia		:{title:"Stumpedia"},
			stylehive		:{title:"Stylehive"},
			svejo			:{title:"Svejo"},
			symbaloo		:{title:"Symbaloo"},
			tagza			:{title:"Tagza"},
			tailrank		:{title:"Tailrank"},
			technorati		:{title:"Technorati"},
			tellmypolitician:{title:"TellMyPolitician"},
			thisnext		:{title:"ThisNext"},
			tipd			:{title:"Tip'd"},
			transferr		:{title:"Transferr"},
			tulinq			:{title:"Tulinq"},
			tumblr			:{title:"Tumblr"},
			tusul			:{title:"Tusul"},
			tweetmeme		:{title:"TweetMeme"},
			twitter			:{title:"Twitter"},
			typepad			:{title:"TypePad"},
			viadeo			:{title:"Viadeo"},
			virb			:{title:"Virb"},
			vyoom			:{title:"Vyoom"},
			w3validator		:{title:"W3 Validator"},
			webnews			:{title:"Webnews"},
			webs			:{title:"webs"},
			windycitizen	:{title:"windycitizen"},
			wordpress		:{title:"WordPress"},
			worio			:{title:"Worio"},
			wovre			:{title:"Wovre"},
			wykop			:{title:"Wykop"},
			xanga			:{title:"Xanga"},
			yahoobkm		:{title:"Y! Bookmarks"},
			yahoomail		:{title:"Y! Mail"},
			yammer			:{title:"Yammer"},
			yardbarker		:{title:"Yardbarker"},
			yigg			:{title:"Yigg"},
			yoolink			:{title:"Yoolink"},
			yorumcuyum		:{title:"Yorumcuyum"},
			youmob			:{title:"YouMob"},
			zakladok		:{title:"100zakladok"}
		}
	}
}

/*
 *    AS3This is free software: you can redistribute it and/or modify
 *    it under the terms of the GNU General Public License as published by
 *    the Free Software Foundation, either version 3 of the License, or
 *    (at your option) any later version.
 *
 *    AS3This is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *    GNU General Public License for more details.
 *
 *    You should have received a copy of the GNU General Public License
 *    along with AS3This.  If not, see <http://www.gnu.org/licenses/>.
 */